GetExpirePeriodDate

SoftwareShield ClientProtector COM Component > ClientProtector (SSCProtector) Reference > GetExpirePeriodDate

## GetExpirePeriodDate

The GetExpirePeriodDate function retrieves the period expire date (if any) of an expiring license. If the license is an expire type and under the influence of a period expire date (past or future), the parameters will return with the period expire date and time (to the minute) that the license will expire. Note that this only considers if the license has a period expire date and ignores hard expire dates.

###### Syntax

HRESULT GetExpirePeriodDate (

long * ExpireYear,
long * ExpireMonth,
long * ExpireDay,
long * ExpireHour,
long * ExpireMinute,
VARIANT_BOOL * IsExpireType

) ;

###### Parameters

ExpireYear

[OUT] This is (a pointer to) a numeric value which returns holding the full Gregorian Local year in which the licenses period expire date occurs (2000 or greater).

ExpireMonth

[OUT] This is (a pointer to) a numeric value which returns holding the Gregorian Local month in which the licenses period expire date occurs (1 through 12 inclusive).

ExpireDay

[OUT] This is (a pointer to) a numeric value which returns holding the Gregorian Local day on which the licenses period expire date occurs (1 through 31 inclusive).

ExpireHour

[OUT] This is (a pointer to) a numeric value which returns holding the military Local hour at which the licenses period expire date occurs (0 through 24 inclusive).

ExpireMinute

[OUT] This is (a pointer to) a numeric value which returns holding the Local minute at which the licenses period expire date occurs (0 through 59 inclusive).

IsExpireType

[OUT] This is (a pointer to) a boolean value which returns holding a value indicating if the license is currently under the influence of a period expire date (past or future). Note that once you successfully use a Release All Expire type of Activation Code on the license, that the license is no longer considered an expire type and this parameter returns false. Always ignore the remaining parameters if this parameter returns containing false.

###### Remarks

Note: This function is illustrated in the SoftwareShield Flowcharts - (see flow chart #3).

The GetExpirePeriodDate function retrieves the period expire date (if any) of an expiring license. If the license is an expire type and under the influence of a period expire date (past or future), the parameters will return with the period expire date and time (to the minute) that the license will expire. Note that this only considers if the license has a period expire date and ignores hard expire dates.

Note that the date and time returned is the Local time for the expiration, not the local time. If you wish to convert to local time, you must do that operation in code.

If the license is not an expiring type license or has no period expire date, then IsExpireType will return holding false. If the license is under the influence of a period expire date (past or future) then IsExpireType will return holding true.

If you instead need to specifically retrieve the hard expire date only considering the hard date, use GetHardExpireDate. If you instead need to retrieve the soonest expire date considering both the hard expire date and the expire period, use GetExpireDate.

###### Return Value

As with all COM function calls they return an HRESULT. HRESULT is a data type that is a 32-bit error or warning code. Check your compilers documentation for information on interpreting the HRESULT value.

###### Function Information

Exposed By Interface: | "ISSCProtector"
Exposed In COM Server Binaries: | "SSCProt.dll" and "SSCProtD.dll"